4.1 Tabulate - frequency tables
The command tabulate
is a tool for creating frequency tables, and is the most common statistics command to map out data/variables and to produce descriptive statistics.
The command can be applied to all categorical variables. These are often alphanumerical, however it is quite possible to create frequency tables for numerical variables as well, as long as the number of values does not become too extensive.
The standard display for tables generated through tabulate
is cells containing frequency numbers (number of units), which can be one-way, two-way, or multi-dimensional. By default, any labels attached to a variable value set are shown in the leading columns and table header, and missing values will be omitted from the table basis.
Through the use of options the table presentations can be customized:
-
View percentages instead of frequencies
-
Show figures in leading columns and table header without value labels
-
View tables with missing values included
-
Create volume tables that show summary values (average, sum, etc.) for any variable within each cell
-
Conduct a chi-test (tests for deviation from a completely random bivariate distribution) through a
chi2
-option
Like most microdata.no commands, tabulate
may be used in combination
with if
-conditions to control which units to be included in the specific table, i.e. dataset populations do not necessarily have to be trimmed in advance of statistical executions.
Syntax expression:
tabulate <variable/variable list> [, <options>]
For more information about this command, use the help tabulate
command. This will display syntax examples and a complete list of available options that can be used to customize the appearance of the statistics generated.
Tables generated through the command tabulate
can be exported to other programs such as Excel, Word, Google Sheets, etc. This is done by
clicking on a "copy"-icon that pops up when the mouse cursor is over the table. Then use the key combination CTRL + C and paste into the desired document. This solution is also applicable for other types of output, such as regress
.
[Examples of using tabulate](i18n\en\docusaurus-plugin-content-docs\current\eksempel\Deskriptiv statistikk\Tabeller - tabulate.md)